import QtQuick 2.12
import QtQuick.Controls 2.12
import Qt.labs.folderlistmodel 2.12
import QtQuick.Window 2.2

SystemWindow {
    id: helpWindow
    visible: true
    width: Screen.desktopAvailableWidth
    height: Screen.desktopAvailableHeight
    title: "Help"

    FolderListModel {
        id: folderModel
        folder: "file:///"
        nameFilters: ["*.png", "*.jpg", "*.jpeg", "*.gif"] // 只显示指定类型的图片文件
        showDirs: false // 不显示文件夹
    }

    ListView {
        anchors.fill: parent
        model: folderModel

        delegate: Item {
            width: 100
            height: 100
            Column {
                Image {
                    source: folderModel.folder + "/" + fileName
                    width: 100
                    height: 100
                }
                Text {
                    text: fileName
                    horizontalAlignment: Text.AlignHCenter
                }
            }
        }
    }
}
